export default {
  data () {
    return {
      selectedList: [
        {
          value: '-1',
          label: '全部'
        },
        {
          value: '0',
          label: '待审核'
        },
        {
          value: '1',
          label: '审核通过'
        },
        {
          value: '2',
          label: '审核未通过'
        },
        {
          value: '3',
          label: '已上架'
        },
        {
          value: '4',
          label: '已下架'
        }
      ],
      timeUnitLimits: [
        { label: '无限制', value: 0 },
        { label: '每天', value: 1 },
        { label: '每周', value: 2 },
        { label: '每月', value: 3 },
        { label: '每年', value: 4 },
        { label: '会员总份数', value: 5 }
      ]
    }
  },
  methods: {
    getEnumsName (value, enums) {
      const result = enums.filter(item => +item.value === +value)
      return result[0] ? result[0].label : ''
    },
    formatTime (timeString) {
      timeString = timeString || ''
      const splits = timeString.split(' ')
      return splits[0].replace(/-/g, '/')
    }
  }
}
